package com.jiajia;

/**
 * @author : zjj
 * @date : 2022/4/25 11:47
 */
public class Demo01StackFrame01 {

        public static void main(String[] args) {
            try {
                Demo01StackFrame01 test = new Demo01StackFrame01();
                test.method1();

            } catch (Exception e) {
                e.printStackTrace();
            }

            System.out.println("main()正常结束");

        }

        public void method1(){
            System.out.println("method1()开始执行...");
            method2();
            System.out.println("method1()执行结束...");
//        System.out.println(10 / 0);

//        return ;//可以省略
        }

        public int method2() {
            System.out.println("method2()开始执行...");
            int i = 10;
            int m = (int) method3();
            System.out.println("method2()即将结束...");
            return i + m;
        }

        public double method3() {
            System.out.println("method3()开始执行...");
            double j = 20.0;
            System.out.println("method3()即将结束...");
            return j;
        }


}
